var swiper = new Swiper('#swiper-container-banner', {
    spaceBetween: 30,
    autoplay: true,//可选选项，自动滑动
    loop: true,
    pagination: {
        el: '#swiper-pagination-banner',
        clickable: true,
        bulletActiveClass: 'my-bullet-active',
        bulletClass: 'my-bullet',
    },
});


var swiperNote = new Swiper('#swiper-container-note', {
    spaceBetween: 30,
    autoplay: true,//可选选项，自动滑动
    direction: 'vertical',
    loop: true
});



var swiperCasw = new Swiper('#swiper-container-case', {
    spaceBetween: 30,
    autoplay: true,//可选选项，自动滑动
    loop: true,
    pagination: {
        el: '#swiper-pagination-case',
        clickable: true,
        bulletActiveClass: 'my-bullet-active',
        bulletClass: 'my-bullet',
    },
});




var isBig = true;

function animate(element) {
    transition.begin(element, [
        ["transform", "scale(1,1)", "scale(0.65,0.65)", "0.7s", "ease-in-out"],
        ["top", "0", "200px", "0.7s", "ease-in-out"],
        ["left", "0", "78px", "0.7s", "ease-in-out"],
        ["border-radius", "0", "50%", "0.7s", "ease-in-out"],
        ["width", "320px", "160px", "0.7s", "ease-in-out"],
        ["height", "320px", "160px", "0.7s", "ease-in-out"],
    ]);
    setTimeout(function () { isBig = false; }, 700);
}
function animate2(element) {
    transition.begin(element, [
        ["transform", "scale(0.65,0.65)", "scale(1,1)", "0.7s", "ease-in-out"],
        ["top", "200px", "0", "0.7s", "ease-in-out"],
        ["left", "78px", "0", "0.7s", "ease-in-out"],
        ["border-radius", "50%", "0", "0.7s", "ease-in-out"],
        ["width", "160px", "320px", "0.7s", "ease-in-out"],
        ["height", "160px", "320px", "0.7s", "ease-in-out"],
    ]);
    setTimeout(function () { isBig = true; }, 700);
}


$(".institute-item").mouseover(function () {
    if (isBig != true)
        return;
    isBig = false;
    animate($(this).find("img")[0]);
    var el = $(this).find(".institute-item-row2");
    $(el).addClass("selected");
}).mouseleave(function () {
    if (isBig != false)
        return;
    isBig = true;
    animate2($(this).find("img")[0]);
    var el = $(this).find(".institute-item-row2");
    $(el).removeClass("selected");
});